package com.project.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.bean.OutOrderBean;
import com.project.service.IOutOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;

@RestController
@RequestMapping("outOrder")
public class OutOrderController {
    @Autowired
    private IOutOrderService orderService;

    @RequestMapping("cutByItem")
    public IPage<OutOrderBean> cutByItem(Integer pageNO, String name,
                                         LocalDate startDate, LocalDate endDate) {
        return orderService.cutByItem(pageNO, name, startDate, endDate);
    }

    @RequestMapping("findById")
    public OutOrderBean findById(Integer orderId) {
        return orderService.findById(orderId);
    }


}
